<div class="menu">
<?php  echo $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
</div><div class="departamentos view">

<?php echo $this->Html->link($this->Html->image('add_departamento_titulo.png', array('alt'=> __('Agregar Departamento', true), 'border' => '0')),
												'../departamentos/add/',array('escape' => false));?>

	<dl><?php $class = ' class="tabla_formulario"';?>
		
		<dt<?php echo $class;?>><?php __('Nombre'); ?></dt>
		<dd<?php echo $class;?>>
			<?php echo $departamento['Departamento']['nombre']; ?>
			&nbsp;
		</dd>
	</dl>
</div>

<div class="related">
	<h3><?php __('Lista Municipios');?></h3>
	<?php if (!empty($departamento['Municipio'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		
		<th><?php __('Nombre'); ?></th>
		<th><?php __('Departamento'); ?></th>
		
		<th class="actions"></th>
	</tr>
	<?php
		$i = 0;
		foreach ($departamento['Municipio'] as $municipio):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $municipio['id'];?></td>
			<td><?php echo $municipio['nombre'];?></td>
			<td><?php echo $municipio['departamento_id'];?></td>
			<td><?php echo $municipio['real'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Ver', true), array('controller' => 'municipios', 'action' => 'view', $municipio['id'])); ?>
				<?php echo $this->Html->link(__('Editar', true), array('controller' => 'municipios', 'action' => 'edit', $municipio['id'])); ?>
				<?php echo $this->Html->link(__('Eliminar', true), array('controller' => 'municipios', 'action' => 'delete', $municipio['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $municipio['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nuevo Municipio', true), array('controller' => 'municipios', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
